#include<bits/stdc++.h>
using namespace std;

class Solution {
public:
    int minSteps(string s, string t) {
        int ans = s.length() + t.length();
        int s1[26];
        memset(s1, 0, sizeof(s1));
        for(int i = 0; i < s.length(); i++)s1[s[i] - 'a']++;
        for(int i = 0; i < t.length(); i++)if(s1[t[i] - 'a'] > 0){
            ans -= 2;
            s1[t[i] - 'a']--;
        }        
        return ans;
    }
};

/**
 * @brief 2022.2.27
 * 周赛
 */